﻿using Model_SSResourceManager;

namespace Presenter_SSResourceManager
{
    public class PresenterAddResoure
    {
        private readonly IViewAddResource _viewAddResource;
        private readonly ModelsManager _mModel;

        public PresenterAddResoure(IViewAddResource viewAddResource)
        {
            this._viewAddResource = viewAddResource;
            _mModel = ModelInstanse.Get();
        }

        public void CreateNew()
        {
            _viewAddResource.FillEmptyResourcePattern(_mModel.resourceModel.Create());
        }

        public void AddNew()
        {
            Resource resource = _viewAddResource.GatherPageFieldsInformation();
            _mModel.resourceModel.Add(resource);
        }



        
    }
}
